import axios from 'axios';
//获取所有分类
let category = (params) => axios.get('/api/category/all', { params });
//获取商品列表
let list = (params) => axios.get('/api/admin/goods/list', { params });
//获取所有分类
let subcate = (params) => axios.get('/api/category/sub', { params });
//删除商品
let remove = (params) => axios.delete('/api/admin/goods', { params });
//删除商品
let cancel = (params) => axios.delete('/api/category', { params });
//编辑分类
let update = (data) => axios.put('/api/category/',data);
//添加分类
let insert = (data) => axios.post('/api/category', data);
//商品详情
let detail = (params) => axios.get('/api/admin/goods', { params });
//添加商品
let release = (data) => axios.post('/api/admin/goods', data);
//省份
let province = (params) => axios.get('/api/pcct/province', { params });
//市
let city = (params) => axios.get('/api/pcct/city', { params });
//县区
let county = (params) => axios.get('/api/pcct/county', { params });
//街道
let town = (params) => axios.get('/api/pcct/town', { params });
export default {
	category,
	list,
	subcate,
	remove,
	update,
	insert,
	detail,
	release,
	province,
	city,
	county,
	town,
	cancel
	
}
